export NAME=ELAPLA
export Execute=$(NAME).exe
export Libary=lib$(NAME).a

export MAIN=main2

SRC=src
EXAMPLE=sample
.PHYON = clean ALL
export CFLAGS = -I../include -I include -std=c99

ALL:$(Execute)
	
$(Execute):$(MAIN) $(Libary) 
	$(CC) $(LDFLAGS) -o $@ $<.o -L. -l$(NAME) $(EXTLIB)

$(MAIN):
	$(MAKE) -C $(EXAMPLE) $(MAIN)

$(Libary):
	$(MAKE) -C $(SRC) LIB

clean:
	$(MAKE) -C $(SRC) clean
	$(MAKE) -C $(EXAMPLE) clean
	$(RM) $(Execute) $(Libary) $(MAIN)